package cn.iocoder.yudao.module.stock.controller.admin.stock.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 商品库存 Response VO")
@Data
@ExcelIgnoreUnannotated
public class StockRespVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15636")
    @ExcelProperty("主键")
    private Long id;

    @Schema(description = "商品id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26636")
    @ExcelProperty("商品id")
    private Long productId;

    @Schema(description = "可用数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty(value = "可用数量", converter = DictConvert.class)
    @DictFormat("product_is_active") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer availableQuantity;

    @Schema(description = "锁定数量")
    @ExcelProperty("锁定数量")
    private Integer lockedQuantity;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}